﻿using System;
using System.Collections.Generic;
using System.Text;

namespace RST
{
    public abstract class BaseRST
    {
        protected Model.RST<T> GetRSTObject<T>(string Model, string Action, object Query)
        {
            return FastJSON.JSON.Instance.ToObject<Model.RST<T>>(GetRSTString(Model, Action, Query));
        }

        protected abstract Model.RST<T> GetRSTObject<T>(string Action, object Query);

        private string GetRSTString(string Model, string Action, object Query)
        {
            return Core.RST.GetRSTString(Model, Action, Query);
        }
    }
}